import request from '@/utils/request'

export function getProductListByPage(data) {
  return request.get('/product/list', { params: data })
}

export function getAllProduct(data) {
  return request.get('/products', data)
}

export function addProduct(data) {
  return request.post('/product', data)
}

export function updateProduct(data) {
  return request.put('/product', data)
}

export function deleteProduct(id) {
  return request.delete('/product/' + id, id)
}
